import request from '@/utils/request'

// 查询平台功能列表
export function listFunction(query) {
  return request({
    url: '/platform/function/list',
    method: 'get',
    params: query
  })
}
//公共端展示
export function listFunctionPublic() {
  return request({
    url: '/platform/function/public/list',
    method: 'get'
  })
}

// 查询平台功能详细
export function getFunction(id) {
  return request({
    url: '/platform/function/' + id,
    method: 'get'
  })
}

// 新增平台功能
export function addFunction(data) {
  return request({
    url: '/platform/function',
    method: 'post',
    data: data
  })
}

// 修改平台功能
export function updateFunction(data) {
  return request({
    url: '/platform/function',
    method: 'put',
    data: data
  })
}

// 删除平台功能
export function delFunction(id) {
  return request({
    url: '/platform/function/' + id,
    method: 'delete'
  })
}
